<T:ViewBase x:Class="WPFExcelReport.TKSMA02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAJHJJ:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAJHJJ}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAMM:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAMM}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAKSTKRS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAKSTKRS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAKST:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAKST}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAAENZL:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAAENZL}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAAENB:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAAENB}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMAAEND:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMAAEND}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMANEUB:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMANEUB}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KSMANEUD:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKSMA.KSMANEUD}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsKSMA,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwKSMA}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwKSMA, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="KSMAMANDANT"
                                    Binding="{Binding Path=KSMAMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAJHJJ"
                                    Binding="{Binding Path=KSMAJHJJ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAJHJJ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAMM"
                                    Binding="{Binding Path=KSMAMM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAMM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAKSTKRS"
                                    Binding="{Binding Path=KSMAKSTKRS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAKSTKRS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAKST"
                                    Binding="{Binding Path=KSMAKST, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAKST}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAART"
                                    Binding="{Binding Path=KSMAART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAAENZL"
                                    Binding="{Binding Path=KSMAAENZL, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAAENZL}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAAENB"
                                    Binding="{Binding Path=KSMAAENB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAAENB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAAEND"
                                    Binding="{Binding Path=KSMAAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMANEUB"
                                    Binding="{Binding Path=KSMANEUB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMANEUB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMANEUD"
                                    Binding="{Binding Path=KSMANEUD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMANEUD}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAFJ"
                                    Binding="{Binding Path=KSMAFJ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAFJ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAPER"
                                    Binding="{Binding Path=KSMAPER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAPER}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMABUDGET"
                                    Binding="{Binding Path=KSMABUDGET, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMABUDGET}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMABEST"
                                    Binding="{Binding Path=KSMABEST, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMABEST}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAIST"
                                    Binding="{Binding Path=KSMAIST, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAIST}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KSMAFILLER"
                                    Binding="{Binding Path=KSMAFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KSMAFILLER}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
